package com.edward.weather;

import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import com.edward.weather.utils.WeatherUtils;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.junit.jupiter.api.Test;

import java.util.List;

@NoArgsConstructor
@Data
public class Demo {

    @Test
    public void test(){
        String url = "https://devapi.qweather.com/v7/weather/now?location=%s";
        url = String.format(url,"101010100");
        String author = "Bearer " + WeatherUtils.getWeatherIcon();
        System.out.println(author);
        HttpResponse httpResponse = HttpRequest.get(url).header("X-QW-Api-Key","764444a4a1cb4a1dbcfb02fe37edbf0a").execute();
        String responseStr = httpResponse.body();
        System.out.println(responseStr);
    }
}
